package com.yuyou.train.user.service;

import java.util.List;

import com.yuyou.train.service.api.user.dto.UserMedalRelationDTO;
import com.yuyou.train.service.api.user.entity.UserMedalItem;
import com.yuyou.train.service.api.user.entity.UserMedalRelation;
import com.yuyou.train.user.vo.resp.RespMyMedalCategory;
import com.yuyou.train.user.vo.resp.RespUserMedalTop;
import com.yuyou.train.util.bean.Pagination;
import com.yuyou.train.util.bean.ResBoolSimpleInfo;


public interface IUserMedalRelationService {
    int deleteByPrimaryKey(String id);

    int insert(UserMedalRelation record);

    UserMedalRelation selectByPrimaryKey(String id);
    
    UserMedalRelation selectUserMedalRelation(String userId,String medalItem);

    int updateByPrimaryKeySelective(UserMedalRelation record);
    
    List<UserMedalRelationDTO> findUserItemRelaPageList(Pagination<UserMedalRelationDTO> p);
    
    int findUserItemRelaPageCount(Pagination<UserMedalRelationDTO> p);

    int countMedalByUserId(String userId);

    List<RespUserMedalTop> findUserMedalTop(String classId);

    Integer myRank(String classId,String userId);

    List<RespMyMedalCategory> findMyMedal(String userId);
    
    ResBoolSimpleInfo<String> addUserMedalRelation(String userId,String medalItem);

    ResBoolSimpleInfo<UserMedalItem> addMedal(String userId, String code);

}